<?php

namespace Member\Controller;

/**
 * 文件上传控制器
 *
 * @since 1.0 2014-11-7 by sutroon
 */
class Uploader extends \Common\Controller\UploadHandlerController {

    // 2017-1-6
    function single_file($name = '', $callback = 'single_uploader_cb', $debug = 'N') {
        $this->assigns(array('name' => $name, 'callback' => $callback, 'debug' => $debug));
        $this->display();
    }

    // 2017-1-6
    function multi_file($name = '', $callback = 'multi_uploader_cb', $debug = 'N') {
        $this->assigns(array('name' => $name, 'callback' => $callback, 'debug' => $debug));
        $this->display();
    }

    function delete($path = '') {
        $result = false;
        if ($path) {
            $path = ROOT_PATH . str_replace('/', DS, $path);
            $result = @unlink($path);
        }
        $this->ajaxReturn(array('status' => $result, 'info' => '删除失败'));
    }

    function uploadFile() {
        
    }

    function uploadFiles() {
        
    }

}
